package com.jacky.javafx.stage;

import javafx.application.Application;
import javafx.scene.layout.Pane;
import javafx.stage.Modality;
import javafx.stage.Stage;

public class Stage4 extends Application {
    @Override
    public void start(Stage rootStage) throws Exception {
        rootStage.setTitle("Root Stage");
        Stage stage = new Stage();
        stage.setTitle("Child Stage");
        stage.initOwner(rootStage);
//        stage.initModality(Modality.WINDOW_MODAL); // 设置窗口模态,如果此窗口不关闭,则不能点击父窗口
        rootStage.show();
        stage.show();

        Stage stage1 = new Stage();
        stage1.setTitle("Other Stage");
        stage1.show();

    }

    public static void main(String[] args) {
        launch(args);
    }
}
